<%-- 
    Document   : form
    Created on : 29.11.2012, 19:00:27
    Author     : Ondra
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<tr>
    <td>
        <form:label path="spz" >SPZ</form:label> 
    </td>
    <td>
        <form:input cssClass="error" path="spz" />
    </td>
    <td>
        <form:errors path="spz" />
    </td>
</tr>    
<tr>
    <td>
        <form:label path="type" ><spring:message code="car.type"/> </form:label> 
    </td>
    <td>
        <form:select path="type" >
            <form:option value="hatchback">hatchback</form:option>
            <form:option value="sedan">sedan</form:option>
            <form:option value="combi">combi</form:option>
            <form:option value="van">van</form:option>
        </form:select>
    </td>
</tr>

<tr>
    <td>
        <form:label path="colour"  ><spring:message code="car.color"/> </form:label>
    </td>
    <td>
        <form:input path="colour" />
    </td>
     <td>
         <form:errors path="colour" />
     </td>
</tr>


<tr>
    <td>
        <form:label path="numberOfSeats" ><spring:message code="car.count"/> </form:label> 
    </td>
    <td>
        <form:select path="numberOfSeats" >
             <form:option value="2">2</form:option>
            <form:option value="4">4</form:option>
            <form:option value="5">5</form:option>
            <form:option value="7">7</form:option>
        </form:select>
    </td>
     <td>  <form:errors cssClass="error" path="numberOfSeats" />
</tr>

<tr>
    <td>
        <form:label path="available" ><spring:message code="car.availability"/> </form:label> 
    </td>
    <td>
         <form:select path="available" >
            <form:option value="true"><spring:message code="car.yes"/> </form:option>
            <form:option value="false"><spring:message code="car.no"/> </form:option>
        </form:select>
    </td>
</tr>

<tr>
    <td>
        <form:label path="company" ><spring:message code="car.company"/> </form:label> 
    </td>
    <td>
         
         <form:select path="company" >
             <c:forEach items="${companies}" var="company" >
            <form:option value="${company.id}"><c:out value="${company.name} " /></form:option>
            </c:forEach>
        </form:select>
    </td>
     <td>
         <form:errors path="company" />
     </td>
</tr>